﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackOffice.Master" AutoEventWireup="true"
    CodeBehind="CadastroLinkUtil.aspx.cs" Inherits="JA.Web.Apresentacao.CadastroLinkUtil" %>

<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
    <div class="art-Block">
        <div class="art-Block-body">
            <div class="art-BlockHeader">
                <div class="l">
                </div>
                <div class="r">
                </div>
                <div class="art-header-tag-icon">
                    <div class="t">
                        Cadastro de Links Úteis</div>
                </div>
            </div>
            <div class="art-BlockContent">
                <div class="art-BlockContent-tl">
                </div>
                <div class="art-BlockContent-tr">
                </div>
                <div class="art-BlockContent-bl">
                </div>
                <div class="art-BlockContent-br">
                </div>
                <div class="art-BlockContent-tc">
                </div>
                <div class="art-BlockContent-bc">
                </div>
                <div class="art-BlockContent-cl">
                </div>
                <div class="art-BlockContent-cr">
                </div>
                <div class="art-BlockContent-cc">
                </div>
                <div class="art-BlockContent-body">
                    <asp:UpdatePanel runat="server">
                        <ContentTemplate>
                            <asp:TabContainer ID="tabLinkUtil" runat="server">
                                <asp:TabPanel ID="tabPesquisa" runat="server" HeaderText="Pesquisa">
                                    <ContentTemplate>
                                        <div style="width: 98%;">
                                            <table style="width: 100%;">
                                                <tr>
                                                    <td>
                                                        C&oacute;digo
                                                    </td>
                                                    <td>
                                                        <asp:TextBox runat="server" ID="txtIdLinkUtil" />
                                                        <asp:MaskedEditExtender runat="server" ID="meeTxtIdLinkUtil" TargetControlID="txtIdLinkUtil"
                                                            Mask="9999999" />
                                                    </td>
                                                    <td>
                                                        Nome
                                                    </td>
                                                    <td>
                                                        <asp:TextBox runat="server" ID="txtLink" />
                                                    </td>
                                                    <td colspan="2">
                                                        <asp:CheckBox runat="server" ID="chkAtivo" Text="Ativo" Checked="true" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="6">
                                                        <asp:Button runat="server" ID="btnPesquisa" Text="Pesquisa" OnClick="btnPesquisa_Click" />
                                                        <br />
                                                        <br />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="6">
                                                        <asp:GridView runat="server" ID="grvResultado" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!">
                                                            <Columns>
                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton runat="server" ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif"
                                                                            ID="imgbVisualizar" OnClick="imgbVisualizar_Click" CommandArgument='<%#Eval("IdLinkUtil") %>' /></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:BoundField DataField="IdLinkUtil" HeaderText="ID" />
                                                                <asp:BoundField DataField="Link" HeaderText="Nome" />
                                                            </Columns>
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="tabCadastro" runat="server" HeaderText="Cadastro">
                                    <ContentTemplate>
                                        <asp:Panel runat="server" ID="panelCad">
                                            <div style="width: 98%;">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td>
                                                            C&oacute;digo:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtCadIdLinkUtil" Enabled="false" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Nome:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtCadLink" Width="450px" MaxLength="255" />
                                                            <asp:RequiredFieldValidator runat="server" ErrorMessage="*" ControlToValidate="txtCadLink"
                                                                ValidationGroup="Salvar" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Url:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtCadUrl" Width="550px" MaxLength="500" />
                                                            <asp:RequiredFieldValidator runat="server" ErrorMessage="*" ControlToValidate="txtCadUrl"
                                                                ValidationGroup="Salvar" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:CheckBox runat="server" ID="chkCadAtivo" Text="Ativo" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            Data Cadastro:
                                                        </td>
                                                        <td>
                                                            <asp:Literal runat="server" ID="ltDataCadastro" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            Cadastrado Por:
                                                        </td>
                                                        <td>
                                                            <asp:Literal ID="ltCadastradoPor" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            Data Edi&ccedil;&atilde;o:
                                                        </td>
                                                        <td>
                                                            <asp:Literal ID="ltDataEdicao" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            Editado Por:
                                                        </td>
                                                        <td>
                                                            <asp:Literal ID="ltEditadoPor" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <span style="color: Red;">(*) Campos Obrigatórios</span><br />
                                                            <br />
                                                            <br />
                                                            <asp:Button runat="server" ID="btnSalvar" Text="Salvar" Enabled="false" OnClick="btnSalvar_Click"
                                                                ValidationGroup="Salvar" UseSubmitBehavior="false" />
                                                            &nbsp;
                                                            <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" OnClick="btnCancelar_Click"
                                                                UseSubmitBehavior="false" />
                                                            &nbsp;
                                                            <asp:Button runat="server" ID="btnEditar" Text="Editar" Enabled="false" OnClick="btnEditar_Click"
                                                                UseSubmitBehavior="false" />
                                                            &nbsp;
                                                            <asp:Button runat="server" ID="btnExcluir" Text="Excluir" Enabled="false" OnClick="btnExcluir_Click"
                                                                UseSubmitBehavior="false" />
                                                            <asp:ConfirmButtonExtender runat="server" TargetControlID="btnExcluir" ConfirmText="Confirma a exclus&atilde;o do link?" />
                                                            &nbsp;
                                                            <asp:Button runat="server" ID="btnNovo" Text="Novo" OnClick="btnNovo_Click" UseSubmitBehavior="false" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:Panel>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
